<?php
    $site_name = JURI::base();
    $tempate_path = $site_name.'templates/hungvuongpanga/';
?>
<!--Thư viện cho tool tip-->


<script type="text/javascript" src="<?php echo $tempate_path; ?>js/jquery.qtip.min.js" ></script>
<link rel="stylesheet" type="text/css" href="<?php echo $tempate_path ?>style/jquery.qtip.min.css" />
<script type="text/javascript">
// Create the tooltips only when document ready
jQuery.noConflict();

jQuery(document).ready(function()
{
   // We'll target all AREA elements with alt tags (Don't target the map element!!!)
   jQuery('area[alt]').qtip(
   {
      content: {
//                     attr: 'alt' // Use the ALT attribute of the area map for the content
           text: function(){
               var alt = jQuery(this).attr('alt');
               return jQuery('#'+alt+' .content').html();
           },
           title: {
                 text: function(api) {
                    // Retrieve content from ALT attribute of the $('.selector') element
                    var alt = jQuery(this).attr('alt');
                    return jQuery('#'+alt+' .title').html();
                 }
              }
      },
       
      style: {
         classes: 'ui-tooltip-blue ui-tooltip-shadow ui-tooltip-rounded'
      },
      
       hide:{
           fixed: true,
           delay: 200,
           effect: function(offset) {
             jQuery(this).slideDown('1000'); // "this" refers to the tooltip
          }
       }
   });
});


</script>
<h1>
    <?php echo JText::_('CONG TY THANH VIEN'); ?>
</h1>
<div style="position: relative">

<?php
    
    $language = &JFactory::getLanguage();
    $locale = $language->getLocale();//  Array (     [0] => vi_VN.utf8     [1] => vi_VN.UTF-8     [2] => vi_VN     [3] => vi     [4] => VN     [5] => vietnam )      
    print_r($locale);
    $flash_name = 'congtycon_580x350_'.$locale[3].'.swf';
    
?>

    <object width="580px" height="350px" type="application/x-shockwave-flash" data="<?php echo $site_name; ?>/images/swf_10_2011/<?php echo $flash_name; ?>" style="width: 580px; height: 350px;">
        <param value="congtycon_580x350.swf" name="src">
        <param value="high" name="quality">
        <param value="showall" name="scale">
        <param value="transparent" name="wmode">
    </object>
    <img usemap="#Map" style="position: absolute; top: 0; left: 0; width: 580px; height: 350px; " src="<?php echo $site_name; ?>/images/swf_10_2011/congtycon_580x350.png" alt="hungvuongpang"  />
    <!--  LƯU Ý: DÙNG ALT CỦA MAP ĐỂ LIÊN KẾT DỮ LIỆU VỚI BÀI VIẾT TRONG THÀNH VIÊN -->
    <map name="Map" id="Map">
      <area shape="rect" coords="510,160,563,185" href="#" alt="an-lac" />
<!--      <area shape="rect" coords="419,160,505,185" href="#" alt="hv-mien_tay" />-->
        <area shape="rect" coords="363,160,416,185" href="#" alt="hv-sa-dec" />
        <area shape="rect" coords="289,161,360,185" href="#" alt="hv-vinh-long" />
        <area shape="rect" coords="225,161,286,186" href="#" alt="chau-au" />
        <area shape="rect" coords="165,160,223,186" href="#" alt="chau-a" />
        <area shape="rect" coords="74,160,163,186" href="#" alt="hv-mascato" />
        <area shape="rect" coords="15,160,70,186" href="#" alt="an-giang" />
        <area shape="rect" coords="451,240,535,264" href="#" alt="viet-thang" />
        <area shape="rect" coords="380,238,442,263" href="#" alt="hv-tay-nam" />
        <area shape="rect" coords="188,240,254,262" href="#" alt="ben-tre" />
    </map>
</div>

<?php foreach ($this->data as $company): ?>
    <div id="<?php echo $company->alias; ?>" style="display: none">
        <div class="title">
            <?php echo $company->title; ?>
        </div>
        <div class="content">
            <?php echo $company->introtext; ?>
        </div>
        
    </div>
<?php endforeach; ?>
